-
Notifications
You must be signed in to change notification settings - Fork 26
fix: several bug-prone behaviors identified by higher spotbugs ranks
#871
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
c-dilks
wants to merge
17
commits into
development
Choose a base branch
from
entomology
base: development
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
spotbugs ranks
384bbe9 to
3b458ee
Compare
let's see how high we can increase the rank without too much pain and suffering...
…g)`, since unused
...non-null parameter of another constructor (`NP_NULL_PARAM_DEREF_NONVIRTUAL`)
spotbugs rank-7 bug `IP_PARAMETER_IS_DEAD_BUT_OVERWRITTEN`
better than breaking the API...
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR increases the spotbugs rank, where higher rank means less "important" bug. Our current rank is 3, and I was able to get us up to rank 7. Ultimately this PR will serve to tighten our static analysis testing for future code, steering us away from bug-prone patterns.
For ranks 7 and below, I fixed the ones I could, and suppressed the ones that did not seem worth the effort. Some unused methods have been deleted.
At rank 8, the number of bug-prone detections skyrockets. I started trying to fix them, but ended up doing much more suppressing (i.e., telling spotbugs to ignore certain bugs) than actual fixes; eventually I gave up, since many of them did not seem too important. I left my rank 8 suppressions commented out in the spotbugs configuration file, in case anyone wants to continue this effort.